// vite.config.ts
import { defineConfig, loadEnv } from "file:///D:/App/front-project/front/node_modules/vite/dist/node/index.js";
import vue from "file:///D:/App/front-project/front/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import { resolve } from "path";
import { createSvgIconsPlugin } from "file:///D:/App/front-project/front/node_modules/vite-plugin-svg-icons/dist/index.mjs";
var __vite_injected_original_dirname = "D:\\App\\front-project\\front";
var vite_config_default = defineConfig(({ mode }) => {
  const viteEnv = loadEnv(mode, process.cwd());
  console.log("vite.config.ts-vite-viteEnv", viteEnv);
  return {
    plugins: [
      vue(),
      createSvgIconsPlugin({
        // 这个是自己配置的图标路径，指出来（自己咋配置的咋来）
        iconDirs: [resolve(process.cwd(), "src/assets/svg")],
        // 这个表示id，按这个来就对了
        symbolId: "icon-[dir]-[name]"
      })
    ],
    resolve: {
      alias: {
        "@": resolve(__vite_injected_original_dirname, "./src"),
        "vue-i18n": "vue-i18n/dist/vue-i18n.cjs.js"
      }
    },
    server: {
      port: Number(viteEnv.VITE_APP_PORT),
      //设置服务启动端口号，是一个可选项，不要设置为本机的端口号，可能会发生冲突
      open: true,
      //是否自动打开浏览器，可选项
      cors: true,
      //允许跨域。
      // 设置代理
      proxy: {
        // 将请求代理到另一个服务器
        // '/api': {
        [viteEnv.VITE_APP_BASE_API]: {
          target: viteEnv.VITE_APP_API_URL,
          //这是你要跨域请求的地址前缀
          // target: 'http://localhost:3333',//这是你要跨域请求的地址前缀
          changeOrigin: true,
          //开启跨域
          rewrite: (path) => path.replace(new RegExp("^" + viteEnv.VITE_APP_BASE_API), "")
        }
      }
    },
    css: {
      preprocessorOptions: {
        scss: {
          additionalData: `@import 'src/style/var.scss';`
          //全局变量的位置
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3R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